<?php


namespace app\admin\validate;


use think\Validate;

class UserTdLevel extends Validate
{
    protected $rule = [
        'name'              =>  'require|unique:user_level',
        'yeji'              =>  'require|float',
        'jl_bl'             =>  'require|float',
        'pj_bl'             =>  'require|float',
        'xq_yeji'             =>  'require|float',
        'num'             =>  'require|number',
    ];
    protected $message = [
        'name.require'           => '请输入等级名称',
        'name.unique'            => '等级名称已存在',
        'yeji.require'       => '请输入所需业绩,不需要填写0!',
        'yeji.float'         => '业绩只能为数字',
        'jl_bl.require'       => '请输入级差奖励比例,不需要填写0!',
        'jl_bl.float'         => '级差奖励比例只能为数字',
        'pj_bl.require'       => '请输入平级奖励比例,不需要填写0!',
        'pj_bl.float'         => '平级奖励比例只能为数字',
        'xq_yeji.require'       => '请输入小区业绩,不需要填写0!',
        'xq_yeji.float'         => '小区业绩只能为数字',
        'num.require'       => '请输入数量,不需要填写0!',
        'num.number'         => '要求数量只能为数字',
    ];
}